BLANK();
DEFINE(FIXMAP_apic_base, fix_to_virt(FIX_APIC_BASE));
+
+ OFFSET(PERFC_hypercalls, struct perfcounter_t, hypercalls);
+ OFFSET(PERFC_exceptions, struct perfcounter_t, exceptions);
}
#include <asm/apicdef.h>
#include <asm/page.h>
#include <public/xen.h>
-
+
#define GET_CURRENT(reg) \
movl $STACK_SIZE-4, reg; \
orl %esp, reg; \
subl $4,%esp
SAVE_ALL(b)
sti
+#ifdef PERF_COUNTERS
+ lock incl SYMBOL_NAME(perfcounters)+PERFC_hypercalls(,%eax,4)
+#endif
GET_CURRENT(%ebx)
- andl $(NR_hypercalls-1),%eax
+ andl $(NR_hypercalls-1),%eax
call *SYMBOL_NAME(hypercall_table)(,%eax,4)
movl %eax,XREGS_eax(%esp) # save the return value
movw XREGS_entry_vector(%esp),%ax
movl %esp,%edx
pushl %edx # push the xen_regs pointer
+#ifdef PERF_COUNTERS
+ lock incl SYMBOL_NAME(perfcounters)+PERFC_exceptions(,%eax,4)
+#endif
GET_CURRENT(%ebx)
call *SYMBOL_NAME(exception_table)(,%eax,4)
addl $4,%esp
case TYPE_S_ARRAY:
for ( j = sum = 0; j < perfc_info[i].nr_elements; j++ )
sum += atomic_read(&counters[j]);
- printk("TOTAL[%10d]\n ", sum);
+ printk("TOTAL[%10d] ", sum);
for ( j = 0; j < perfc_info[i].nr_elements; j++ )
{
printk("A%02d[%10d] ", j, atomic_read(&counters[j]));
PERFCOUNTER_ARRAY( wpt_updates, "writable pt updates", PERFC_MAX_PT_UPDATES )
PERFCOUNTER_ARRAY( bpt_updates, "batched pt updates", PERFC_MAX_PT_UPDATES )
+PERFCOUNTER_ARRAY( hypercalls, "hypercalls", NR_hypercalls )
+PERFCOUNTER_ARRAY( exceptions, "exceptions", 32 ) /* XXX constant */
#define VMX_PERF_EXIT_REASON_SIZE 37
#define VMX_PERF_VECTOR_SIZE 0x20